package String;

/**
 *
 * boolean startsWith(String str)
 * 判断当前字符串是否以给定字符串开始的
 *
 * boolean endsWith(String str)
 * 判断当前字符串是否以给定字符串结束的
 */

public class StartsWithDemo {
    public static void main(String[] args) {
        String line ="www.tedu.com";
        boolean a1 = line.startsWith("www");
        System.out.println(a1);
        boolean a2 =line.startsWith("WWW");
        System.out.println(a2);

        boolean b1 = line.endsWith("com");
        boolean b2 = line.endsWith("COM");
        System.out.println(b1+","+b2);


    }
}
